#define _CRT_SECURE_NO_WARNINGS 1
#include "List.h"

void testList()
{
	List<int> list;
	list.push_back(1);
	list.push_back(2);
	list.push_back(3);
	list.push_back(4);

	auto it = list.begin();
	while (it != list.end())
	{
		std::cout << *it << " ";
		++it;
	}
	std::cout << std::endl;
	list.push_front(5);
	list.push_front(6);
	list.push_front(7);

	for (auto e : list)
	{
		std::cout << e << " ";
	}
	std::cout << std::endl;

	list.pop_back();
	list.pop_back();
	for (auto e : list)
	{
		std::cout << e << " ";
	}
	std::cout << std::endl;

	list.pop_front();
	list.pop_front();
	for (auto e : list)
	{
		std::cout << e << " ";
	}
	std::cout << std::endl;
}

int main()
{
	testList();

	return 0;
}